70b5c9
@@ -507,12 +507,14 @@
public class CellComparator implements Comparator<Cell>, Serializable {
   }
 
   /**
-   * Compare the timestamp of the left and right cell
-   *
-   * @param left
-   * @param right
-   * @return 0 if equal, -1 if left's ts is less than right's ts, 1 if left's ts
-   *         is greater than right's ts
+   * Compares cell's timestamps in DESCENDING order.
+   * The below older timestamps sorting ahead of newer timestamps looks
+   * wrong but it is intentional. This way, newer timestamps are first
+   * found when we iterate over a memstore and newer versions are the
+   * first we trip over when reading from a store file.
+   * @return 1 if left's timestamp < right's timestamp
+   *         -1 if left's timestamp > right's timestamp
+   *         0 if both timestamps are equal
    */
   public static int compareTimestamps(final Cell left, final Cell right) {
     return compareTimestamps(left.getTimestamp(), right.getTimestamp());
@@ -594,14 +596,13 @@
public class CellComparator implements Comparator<Cell>, Serializable {
   }
 
   /**
+   * Compares timestamps in DESCENDING order.
    * The below older timestamps sorting ahead of newer timestamps looks
    * wrong but it is intentional. This way, newer timestamps are first
    * found when we iterate over a memstore and newer versions are the
    * first we trip over when reading from a store file.
-   * @param ltimestamp
-   * @param rtimestamp
-   * @return 1 if left timestamp > right timestamp
-   *         -1 if left timestamp < right timestamp
+   * @return 1 if left timestamp < right timestamp
+   *         -1 if left timestamp > right timestamp
    *         0 if both timestamps are equal
    */
   public static int compareTimestamps(final long ltimestamp, final long rtimestamp) {
